import java.util.Arrays;

public class Test1 {
    public static void main(String[] args) {
//        分割
        String[] sp= "韩文栩".split("文");
        System.out.println(Arrays.toString(sp));
//  截取
        String sub = "韩文栩".substring(1);
        sub = "韩文栩".substring(1,2);
        System.out.println(sub);
//        包含
        boolean con = "韩文栩".contains("栩");
        con = "韩文栩".contains("韩栩");
        System.out.println(con);
//        以~··开头
        boolean start = "韩文栩".startsWith("韩文");
        start = "韩文栩".startsWith("韩栩");
        System.out.println(start);
//        获取长度
        int i = "韩文栩".length();
        System.out.println(i);
//替换
        String re = "韩   文   栩  ".replace(" ", "");
        System.out.println(re);
//        是否相等
        boolean baohan = "韩文栩".equals("韩文栩 ");
        System.out.println(baohan);


    }
}
